<?php

namespace app\admin\model;
use think\Model;
use think\Session;

class RuleModel extends Model {
	//权限判断
	protected function base($query)
	{
		$uid = Session::get('admin.id');
		$map = ['admin_id' => $uid];
		$menu = Session::get('menu');
		//不是超级管理员
		if(!$menu){
			$query->where($map);
		}
	}
}